<template>
	<div>
		<text  class="i-icon" :style="{ color, fontSize: size }">
			{{icon[name]}}
		</text>
	</div>
	
</template>
<script>
	import icon from "./js/icon.js"
	// #ifdef APP-NVUE
	var domModule = weex.requireModule("dom");
	// 这里的CDN和css中的CDN一致
	domModule.addRule('fontFace', {
		'fontFamily': 'remixicon',
		src: "url('https://cdn.jsdelivr.net/npm/remixicon@2.5.0/fonts/remixicon.ttf?t=1590207869815')"
	});
	// #endif
	export default {
		props: {
			name: {
				type: String,
				default: "",
			},
			color: {
				type: String,
				default: "black",
			},
			size: {
				type: String,
				default: "40rpx",
			},
		},
		data() {
			return {
				icon
			}
		},
		methods: {
			
		}
	};
</script>
<style scoped>
	/* #ifndef APP-NVUE */
	@font-face {
	  font-family: remixicon;
	  /* lilishop的 https://lilishop-oss.oss-cn-beijing.aliyuncs.com/8fd12508ab18401ab5d1655d1fa5af3e.ttf */
	  src: url('https://cdn.jsdelivr.net/npm/remixicon@2.5.0/fonts/remixicon.ttf?t=1590207869815') format('truetype');
	}
	/* #endif */
	.i-icon {
		font-family: remixicon !important;
		text-decoration: none;
		text-align: center;
		font-style: normal;
	}
</style>
